<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Admin后台 - Layui</title>
    <link  rel="stylesheet" type="text/css" th:href="@{/static/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/mystyle.css}"/>
    <script th:src="@{/static/js/jquery-1.11.3.min.js}"></script>
    <script th:src="@{/static/js/myjs.js}"/>
    <script th:src="@{/static/js/layer.js}"/>
    <script th:src="@{/static/js/layui.js}"></script>
    <script th:src="@{/static/js/vue.js}"></script>

</head>
<body>
<div class="layui-row allbg">
    <div class="layui-col-xs11 layui-col-xs-offset0.5">
    <div th:insert="~{admin/index::headsidebar}"></div>

    <div th:insert="~{admin/index::leftsidebar}"></div>

    <div class="layui-col-xs9 layui-col-sm8 layui-col-md8 layui-col-lg9 mainright">
        <div class="">
            <form class="" th:action="@{/books/query}" method="post">
                <table class="navtable" lay-skin="nob" style="width: 100%;">
                    <colgroup style="width: 100%;">
                        <col width="33%">
                    </colgroup>
                    <thead>
                    <tr>
                        <th class="navth">
                            <a th:href="@{/books/toadd}" type="button" class="layui-btn layui-btn-sm layui-btn-radius">添加书籍</a>
                        </th>
                        <th>
                            <input type="submit" class="layui-btn layui-btn-sm" value="查询"/>
                        </th>
                        <th>
                            <input type="text" name="bookName" autocomplete="off" placeholder="请输入标题" class="layui-input">
                        </th>
                    </tr>
                    </thead>
                </table>
            </form>
            <table class="list-table">
                <colgroup>
                    <col width="100">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                <tr>
                    <th>编号</th>
                    <th style="width: 12em;">名称</th>
                    <th style="width: 12em;">版本</th>
                    <th style="width: 6em;">作者</th>
                    <th style="width: 8em;">数量</th>
                    <th style="width: 15em;">时间</th>
                    <th style="width: 10em;">备注</th>
                    <th style="width: 10em;">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr style="height: 0.6em;"></tr>
                <tr  th:each="book:${books}">
                    <td><span>[&nbsp;</span><small th:text="${book.getBookId()}"></small><span>&nbsp;]</span></td>
                    <td><span>《&nbsp;</span><small th:text="${book.getBookName()}"></small><span>&nbsp;》</span></td>
                    <td th:text="${book.getBookVersion()}"></td>
                    <td th:text="${book.getAuthor()}"></td>
                    <td th:text="${book.getAmount()}"></td>
                    <td th:text="${book.getBookDate()}" pattern="yyyy-MM-dd HH:mm:ss"></td>
                    <td th:text="${book.getRemark()}"></td>
                    <td style="text-align: center;">
                        <a th:href="@{/books/toupd/{bookId}(bookId=${book.bookId})}" type="button" class="layui-btn layui-btn-sm layui-btn-danger"><i class="layui-icon"></i></a>
                        <a type="button" th:href="@{/books/drop/}+${book.getBookId()}" class="layui-btn layui-btn-sm layui-btn-danger"><i class="layui-icon"></i></a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div th:insert="~{admin/index::footersidebar}"></div>
    </div>
</div>
<script>
    useSIDEBAR
</script>
</body>
</html>


